package com.littleken.qrcode;

import jp.sourceforge.qrcode.QRCodeDecoder;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

public class ReadQRCode_qrcode {
    public static void main(String[] args) throws IOException {
        File file = new File("D://img2.png");
        BufferedImage bufferedImage = ImageIO.read(file);

        QRCodeDecoder codeDecoder = new QRCodeDecoder();
        String result =new String(codeDecoder.decode(new MyQRCodeImage(bufferedImage)),"gb2312");
        System.out.println(result);
    }
}
